function pxReize(px: number) {
  return (px * document.documentElement.clientWidth) / 1680;
}

export function getOption4() {
  return {
    grid: {
      left: pxReize(20),
      top: pxReize(60),
      bottom: pxReize(10),
      right: pxReize(10),
      containLabel: true,
    },
    legend: {
      data: ['上海', "北京", "深圳", "浙江", "广州"],
      left: 0,
      top: 'center',
      width: pxReize(140)
    },
    tooltip: {
      show: false
    },
    center: ['50%', "60%"],
    title: {
      text: "模块标题样式",
      textStyle: {
        color: "#fff",
        fontSize: pxReize(20),
      },
    },
    series: [
      {
        name: "上海",
        type: "pie",
        radius: ["60%", "70%"],
        center: ['50%', "60%"],
        data: [
          {
            value: 2,
            itemStyle: {
              color: "rgba(255,255,255,0.15)",
            },
          },
          { value: 7 },
        ],
        itemStyle: {
          color: "rgba(15, 112, 216, .7)",
        },
        labelLine: {
          show: false
        }
      },
      {
        name: "广州",
        type: "pie",
        radius: ["50%", "60%"],
        center: ['50%', "60%"],
        data: [
          {
            value: 2.5,
            itemStyle: {
              color: "rgba(255,255,255,0.13)",
            },
          },
          { value: 7 },
        ],
        itemStyle: {
          color: "rgba(15, 112, 216, .6)",
        },
        labelLine: {
          show: false
        }
      },
      {
        name: "浙江",
        type: "pie",
        radius: ["40%", "50%"],
        center: ['50%', "60%"],
        data: [
          {
            value: 3,
            itemStyle: {
              color: "rgba(255,255,255,0.11)",
            },
          },
          { value: 7 },
        ],
        itemStyle: {
          color: "rgba(15, 112, 216, .5)",
        },
        labelLine: {
          show: false
        }
      },
      {
        name: "深圳",
        type: "pie",
        radius: ["30%", "40%"],
        center: ['50%', "60%"],
        data: [
          {
            value: 3.5,
            itemStyle: {
              color: "rgba(255,255,255,0.09)",
            },
          },
          { value: 7 },
        ],
        itemStyle: {
          color: "rgba(15, 112, 216, .4)",
        },
        labelLine: {
          show: false
        }
      },
      {
        name: "北京",
        type: "pie",
        radius: ["20%", "30%"],
        center: ['50%', "60%"],
        data: [
          {
            value: 4,
            itemStyle: {
              color: "rgba(255,255,255,0.07)",
            },
          },
          { value: 7 },
        ],
        itemStyle: {
          color: "rgba(15, 112, 216, .3)",
        },
        labelLine: {
          show: false
        }
      },
    ],
  };
}
